package com.service;

import com.dao.BookMapper;
import com.pojo.Books;

import java.util.List;


public class BookServiceImpl implements BookService
{

    //service invokes dao
    private BookMapper bookMapper;

    public BookMapper getBookMapper() {
        return bookMapper;
    }

    public void setBookMapper(BookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }


    public int addBook(Books books) {
        return bookMapper.addBook(books);
    }

    public int deleteBookByID(int id) {
        return bookMapper.deleteBookByID(id);
    }

    public int updateBook(Books books) {
        return bookMapper.updateBook(books);
    }

    public Books querybookbyId(int id) {
        return bookMapper.querybookbyId(id);
    }

    public List<Books> queryAllBook() {
        return bookMapper.queryAllBook();
    }
}
